package com.dsj.gxrd.modules.people.domain.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.time.LocalDate;
import java.util.List;

/**
 * @author songpin566
 * @date 2023/09/21
 **/
@Data
public class RdUserInfoDto {

    @ApiModelProperty("赣县人大用户详情id")
    private Long id;
    @ApiModelProperty("对应的用户id")
    private Long userId;
    @ApiModelProperty("党派")
    @NotEmpty(message = "党派不能为空")
    private String partyGroup;
    @NotNull(message = "所属机构不能为空")
    @ApiModelProperty("所属机构id")
    private Long organizationId;
    @ApiModelProperty("所属机构名称")
    private String organizationName;
    @ApiModelProperty("现任职务")
    @Size(min = 1,max = 200,message = "现任职务长度在1-100个字符")
    private String nowDuty;
    @ApiModelProperty("代表证号")
    private String representNumber;
    @ApiModelProperty("驾驶舱查看(0可查看 1不可)")
    private Integer cockpitView;
    @ApiModelProperty("姓名")
    @NotEmpty(message = "姓名不能为空")
    private String name;
    @ApiModelProperty("性别(0男 1女)")
    @NotNull(message = "性别不能为空")
    private Integer sex;
    @ApiModelProperty("民族")
    @NotEmpty(message = "民族不能为空")
    private String nation;
    @ApiModelProperty("头像")
    private String headImage;
    @ApiModelProperty("籍贯")
    private String nativePlace;
    @ApiModelProperty("文化")
    private Integer culture;
    @ApiModelProperty("入党时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate joinPartyTime;
    @ApiModelProperty("乡镇")
    private Integer township;
    @ApiModelProperty("所属级别(多个用逗号隔开)")
    @NotEmpty(message = "所属级别不能为空")
    private String level;
    @ApiModelProperty("届")
    private String session;
    @ApiModelProperty("联系方式")
    @Pattern(regexp = "^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(17[013678])|(18[0,5-9]))\\d{8}$",message = "手机号格式不正确")
    private String phonenumber;
    @ApiModelProperty("邮箱")
    private String email;
    @ApiModelProperty("排序")
    private Integer sort;
    @ApiModelProperty("工作职责")
    private String workDuty;
    @ApiModelProperty("承诺")
    private String promise;

    private List<Long> roleIds;

}



